package utils;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.apache.log4j.Logger;


/**
 * Application Lifecycle Listener implementation class ServletListener
 *
 */

public class WebChatServletContextListener implements ServletContextListener {

	private static Logger log = Logger.getLogger(WebChatServletContextListener.class);
	
    /**
     * Default constructor. 
     */
    public WebChatServletContextListener() {
    	super();
    }

	/**
     * @see ServletContextListener#contextInitialized(ServletContextEvent)
     */
    public void contextInitialized(ServletContextEvent arg0) {
//    	log.debug("Servlet context initialized.");
//    	log.debug("Initializing ...");    	
//    	try {
//			//Class.forName("utils.HibernateUtil");
//    		Class.forName("utils.SpringUtil");			
//		} catch (ClassNotFoundException e) {
//			log.error("initialization error ", e);
//			throw new RuntimeException();
//		}    	
//    	log.debug("initialized...");
    }

	/**
     * @see ServletContextListener#contextDestroyed(ServletContextEvent)
     */
    public void contextDestroyed(ServletContextEvent arg0) {
//    	log.debug("Servlet context destroyed.");
    }
	
}
